package cn.ikun.dhj;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class AppWeio {
    public static void main(String[] args) throws Exception{
      /*  Weio h = new Weio();
        String name = h.getName();
        System.out.println(name);*/
        Class<?> aClass = Class.forName("cn.ikun.dhj.Weio");
        //创建实例对象
        Object o = aClass.newInstance();
        Field name = aClass.getDeclaredField("name");
        name.setAccessible(true);
        name.set(o,"weio sang ba ni duo sang");
        Method getName = aClass.getMethod("getName");
        Object restul = getName.invoke(o);
        System.out.println(restul);


    }
}
